package cn.hebutrun.oulabot.quartz.job;

import cn.hebutrun.oulabot.common.util.ApiUtil;
import cn.hebutrun.oulabot.common.util.BotUtil;
import cn.hebutrun.oulabot.common.util.LogUtil;
import lombok.RequiredArgsConstructor;
import org.quartz.JobExecutionContext;
import org.springframework.lang.NonNull;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @author zhaolong
 * @since 2022-04-14
 */
@RequiredArgsConstructor
public class RemindLunchJob extends QuartzJobBean {
  private final ApiUtil apiUtil;

  @Override
  protected void executeInternal(@NonNull JobExecutionContext context) {
    LogUtil.quartzExecuteInfo(context);
    BotUtil.sendMessage(
        "", 165886753L, null,
        apiUtil.goodAfternoon() + "\n" + BotUtil.getCQAtAll() + "各位小主，是时候该用膳了");
  }
}
